class Animal{
    String name;
    int age;
    public void eat(){
        System.out.println(name+"正在吃饭");
    }
    public void sleep(){
        System.out.println(name+"正在睡觉");
    }
}
class cat extends Animal {
    void bark(){
        System.out.println(name+"喵喵喵");
    }
}
class dog extends Animal {
    void bark(){
        System.out.println(name+"汪汪汪");
    }
}
public class Inherit {


    public static void main(String[] args) {
        dog dog1 = new dog();
        System.out.println(dog1.name);
        System.out.println(dog1.age);
        dog1.eat();
    }
}
